package com.qf.weektest.weektest.controller;

import com.qf.weektest.vo.ResultVo;
import com.qf.weektest.weektest.entity.Tel;
import com.qf.weektest.weektest.service.ITelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.UnsupportedEncodingException;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ljc
 * @since 2023-02-24
 */
@RestController
@RequestMapping("/get")
@Slf4j
public class TelController {

    @Autowired
    ITelService TelService;

    @GetMapping("/tel")
    public ResultVo getToken(HttpServletRequest request,HttpServletResponse response,String telephone) throws UnsupportedEncodingException {
        log.debug("tel:{}",telephone);

        return TelService.getToken(request,response,telephone);

    }


}
